package com.ruoyi.service.masterdate.impl;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.mapper.jpjs.person.PersonMapper;
import com.ruoyi.mapper.masterdate.CompanyMapper;
import com.ruoyi.service.jpjs.person.PersonService;
import com.ruoyi.service.masterdate.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
@DataSource(value = DataSourceType.SLAVE)
public class CompanyServiceImpl implements CompanyService {
    @Autowired
    private CompanyMapper companyMapper;

    @Override
    public List<Map<String, Object>> findCompanyAll(Map<String, Object> map) {
        return companyMapper.findCompanyAll(map);
    }

    @Override
    public Map<String, Object> findCompany(String id) {
        return companyMapper.findCompany(id);
    }

    @Override
    public int addCompany(Map<String, Object> map) {
        return companyMapper.addCompany(map);
    }

    @Override
    public int editCompany(Map<String, Object> map) {
        return companyMapper.editCompany(map);
    }

    @Override
    public int checkCodeUnique(Map<String, Object> map) {
        return companyMapper.checkCodeUnique(map);
    }
}
